#ifndef ADMINLOGINFORM_H
#define ADMINLOGINFORM_H

#include <QWidget>
#include "pageadmininfo.h"
#include "pageuserinfo.h"
#include "pagedeviceinfo.h"
#include "pagealarmmgmt.h"
#include "pagedataanalysis.h"
#include "pagedatamonitor.h"
#include "pagedevicemgmt.h"
#include "pagelogmgmt.h"
#include "pageusermgmt.h"
#include "pageadminupdateinfo.h"
#include <QButtonGroup>

namespace Ui {
class adminLoginForm;
}

class adminLoginForm : public QWidget
{
    Q_OBJECT

public:
    // 定义枚举来管理页面索引
    enum  PageIndex {
        PAGE_ADMIN_INFO,
        PAGE_USER_MGMT ,
        PAGE_DEVICE_INFO ,
        PAGE_ALARM_MGMT,
        PAGE_DEVICE_MGMT,
        PAGE_DATA_MONITOR,
        PAGE_LOG_MGMT,
        PAGE_DATA_ANALYSIS,
        PAGE_ADMIN_UPDATE_INFO
    };

    explicit adminLoginForm(Mainbar *mainbar, QWidget *parent = nullptr); // 添加 Mainbar 参数
    ~adminLoginForm();

signals:
    void sendMessage(const QString &);
    int display(int);

public slots:
    void onDisplayChanged(int index);
    void onPageAdminUpdateInfoMessage(const QString &);

private:
    Ui::adminLoginForm *ui;
    pageAdminInfo *m_pageAdminInfo;
    pageAdminUpdateInfo *m_pageAdminUpdateInfo;
    pageUserMgmt *m_pageUserMgmt;
    pageDeviceInfo *m_pageDeviceInfo;
    pageAlarmMgmt *m_pageAlarmMgmt;
    pageDeviceMgmt *m_pageDeviceMgmt;
    pageDataMonitor *m_pageDataMonitor;
    pageLogMgmt *m_pageLogMgmt;
    pageDataAnalysis *m_pageDataAnalysis;
    QButtonGroup *m_buttonGroup;


};

#endif // ADMINLOGINFORM_H
